package cn.edu.zzuli.web.dao;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import cn.edu.zzuli.web.dao.base.AbstractDao;

@Repository("systemDAO")
public class SystemDAO extends AbstractDao {
	
	public SystemDAO() {
	}

	public void systemBak(){
		List<String> list = new ArrayList<String>();
		list.add("forum");
		list.add("role");
		list.add("user");
		list.add("user_role");
		String time = System.currentTimeMillis() + "";
		for(String tableName : list){
			String createsql = "CREATE TABLE " + tableName + time.substring(5) + " SELECT * FROM " + tableName;
			this.getJdbcTemplate().execute(createsql);
		}
	}

}
